import rpRequest from '../../index'

import { IDataType } from './type'

export function getPageTableList(url: string, queryInfo: any) {
  return rpRequest.post<IDataType>({
    url,
    data: queryInfo
  })
}

export function deletePageTableList(url: string) {
  return rpRequest.delete<IDataType>({
    url
  })
}

export function createPageTableList(url: string, queryInfo: any) {
  return rpRequest.post<IDataType>({
    url,
    data: queryInfo
  })
}

export function editPageTableList(url: string, queryInfo: any) {
  return rpRequest.patch<IDataType>({
    url,
    data: queryInfo
  })
}

export function getDepartmentList(url: string, queryInfo: any) {
  return rpRequest.post<IDataType>({
    url,
    data: queryInfo
  })
}

export function getRoleList(url: string, queryInfo: any) {
  return rpRequest.post<IDataType>({
    url,
    data: queryInfo
  })
}